<?php

class ome_mdl_expressfee extends dbeav_model{
    
    
     
	//查询明细
    function getAreaConfig($id='')
    {
     	$sql="select distinct A.areaGroupId,A.areaGroupId areaGroupBakId,A.areaGroupName,A.logistics,A.firstprice,A.firstunit,A.continueprice,A.continueunit,A.dt_expressions,case when A.dt_useexp =true  then '1' else '0' end dt_useexp from sdb_ome_expressfee_objects A
			where A.expressfee_id=".$id;
        $rows = $this->db->select($sql);
        foreach ($rows as $key => $value) 
        {
        	$rows[$key]['logisticsIns']=explode(",", $value['logistics']);

        }
        return $rows;
    }
    //查询明细
    function getAreaObjects($id='')
    {
        $sql="select A.* from sdb_ome_expressfee_objects A
                    inner join sdb_ome_expressfee B on A.expressfee_id=B.id
                    where B.shop_id='$id'";
        $rows = $this->db->select($sql);
        
        return $rows;
    }
    
}